package kafkaToMysql.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author HuBiWei
 * @create 2022/4/27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyResult implements Serializable {
    private String name;
    private int age;

    public String toSql() {
        return String.format(
                "insert into t_person(`name`,`age`) value('%s',%d)",
                name,
                age);
    }
}
